#pragma once
#include <nice2d/widgets/control.h>

class CheckBoxStyle : public ControlStyle
{
    DECLARE_OBJECT(CheckBoxStyle)
public:
    CheckBoxStyle();
    BackgroundPointer uncheckedBackground;
};

class CheckBox : public Control
{
    DECLARE_OBJECT(CheckBox)
public:
    CheckBox(const sf::Vector2f &size = sf::Vector2f(48,48));
    ~CheckBox();
public:
    void setChecked(bool value);
    bool isChecked()const;
    boost::signals2::signal<void(bool)> checked;
private:
    void onMouseEnter() override;
    void onMouseExit() override;
    void onMousePressed(sf::Mouse::Button button)override;
private:
    std::unique_ptr<class CheckBoxData> data;
};